package com.awccis.common.session;

import javax.websocket.Session;
import java.util.Date;

/**
 * @Author: 纯牛奶丶
 * @Date: 2018-03-30 0030 下午 05:10
 * @Since: 1.0
 * @Decription: 司机会话信息
 **/

public class DriverSession {

    private int driverId;
    private String driverName;
    private String driverAliasName;
    private int driverNickName;
    private String driverPhone;
    private int driverRange;
    private int driverIntegral_count;
    private int carLoadNum;
    private String carPlateNum;
    private String carBrand;
    private String carType;
    private int starLevel;
    private double lat;
    private double lng;
    private boolean isWork;
    private boolean isReady;
    private Date onLineTime;
    private Session session;
    private double distance;

    public DriverSession(int driverNickName, Session session) {
        this.driverNickName = driverNickName;
        this.session = session;
    }

    public DriverSession(int driverNickName,String driverName, String driverPhone, double lat, double lng, boolean isWork) {
        this.driverNickName = driverNickName;
        this.driverName = driverName;
        this.driverPhone = driverPhone;
        this.lat = lat;
        this.lng = lng;
        this.isWork = isWork;
    }

    public DriverSession(int driverId, String driverName, String driverAliasName, int driverNickName, String driverPhone, int driverRange, int driverIntegral_count, int carLoadNum, String carPlateNum, String carBrand, String carType, int starLevel, double lat, double lng, boolean isReady, boolean isWork, Date onLineTime) {
        this.driverId = driverId;
        this.driverName = driverName;
        this.driverAliasName = driverAliasName;
        this.driverNickName = driverNickName;
        this.driverPhone = driverPhone;
        this.driverRange = driverRange;
        this.driverIntegral_count = driverIntegral_count;
        this.carLoadNum = carLoadNum;
        this.carPlateNum = carPlateNum;
        this.carBrand = carBrand;
        this.carType = carType;
        this.starLevel = starLevel;
        this.lat = lat;
        this.lng = lng;
        this.isWork = isWork;
        this.isReady = isReady;
        this.onLineTime = onLineTime;
    }

    public DriverSession(int driverId, String driverName, String driverAliasName, int driverNickName, String driverPhone, int driverRange, int driverIntegral_count, int carLoadNum, String carPlateNum, String carBrand, String carType, int starLevel, double lat, double lng, boolean isWork, Session session) {
        this.driverId = driverId;
        this.driverName = driverName;
        this.driverAliasName = driverAliasName;
        this.driverNickName = driverNickName;
        this.driverPhone = driverPhone;
        this.driverRange = driverRange;
        this.driverIntegral_count = driverIntegral_count;
        this.carLoadNum = carLoadNum;
        this.carPlateNum = carPlateNum;
        this.carBrand = carBrand;
        this.carType = carType;
        this.starLevel = starLevel;
        this.lat = lat;
        this.lng = lng;
        this.isWork = isWork;
        this.session = session;
    }

    public int getDriverId() {
        return driverId;
    }

    public void setDriverId(int driverId) {
        this.driverId = driverId;
    }

    public String getDriverName() {
        return driverName;
    }

    public void setDriverName(String driverName) {
        this.driverName = driverName;
    }

    public String getDriverAliasName() {
        return driverAliasName;
    }

    public void setDriverAliasName(String driverAliasName) {
        this.driverAliasName = driverAliasName;
    }

    public int getDriverNickName() {
        return driverNickName;
    }

    public void setDriverNickName(int driverNickName) {
        this.driverNickName = driverNickName;
    }

    public String getDriverPhone() {
        return driverPhone;
    }

    public void setDriverPhone(String driverPhone) {
        this.driverPhone = driverPhone;
    }

    public int getDriverRange() {
        return driverRange;
    }

    public void setDriverRange(int driverRange) {
        this.driverRange = driverRange;
    }

    public int getDriverIntegral_count() {
        return driverIntegral_count;
    }

    public void setDriverIntegral_count(int driverIntegral_count) {
        this.driverIntegral_count = driverIntegral_count;
    }

    public int getCarLoadNum() {
        return carLoadNum;
    }

    public void setCarLoadNum(int carLoadNum) {
        this.carLoadNum = carLoadNum;
    }

    public String getCarPlateNum() {
        return carPlateNum;
    }

    public void setCarPlateNum(String carPlateNum) {
        this.carPlateNum = carPlateNum;
    }

    public String getCarBrand() {
        return carBrand;
    }

    public void setCarBrand(String carBrand) {
        this.carBrand = carBrand;
    }

    public String getCarType() {
        return carType;
    }

    public void setCarType(String carType) {
        this.carType = carType;
    }

    public int getStarLevel() {
        return starLevel;
    }

    public void setStarLevel(int starLevel) {
        this.starLevel = starLevel;
    }

    public double getLat() {
        return lat;
    }

    public void setLat(double lat) {
        this.lat = lat;
    }

    public double getLng() {
        return lng;
    }

    public void setLng(double lng) {
        this.lng = lng;
    }

    public boolean isWork() {
        return isWork;
    }

    public void setWork(boolean work) {
        isWork = work;
    }

    public Session getSession() {
        return session;
    }

    public void setSession(Session session) {
        this.session = session;
    }

    public Date getOnLineTime() {
        return onLineTime;
    }

    public void setOnLineTime(Date onLineTime) {
        this.onLineTime = onLineTime;
    }

    public double getDistance() {
        return distance;
    }

    public void setDistance(double distance) {
        this.distance = distance;
    }

    public boolean isReady() {
        return isReady;
    }

    public void setReady(boolean ready) {
        isReady = ready;
    }

    @Override
    public String toString() {
        return "DriverSession{" +
                "driverId=" + driverId +
                ", driverName='" + driverName + '\'' +
                ", driverAliasName='" + driverAliasName + '\'' +
                ", driverNickName=" + driverNickName +
                ", driverPhone='" + driverPhone + '\'' +
                ", driverRange=" + driverRange +
                ", driverIntegral_count=" + driverIntegral_count +
                ", carLoadNum=" + carLoadNum +
                ", carPlateNum='" + carPlateNum + '\'' +
                ", carBrand='" + carBrand + '\'' +
                ", carType='" + carType + '\'' +
                ", starLevel=" + starLevel +
                ", lat=" + lat +
                ", lng=" + lng +
                ", isWork=" + isWork +
                ", isReady=" + isReady +
                ", onLineTime=" + onLineTime +
                ", session=" + session +
                ", distance=" + distance +
                '}';
    }

    public void setLocation(double lat, double lng) {
        this.lat = lat;
        this.lng = lng;
    }

    public DriverSession Dclone() {
        return new DriverSession(driverId, driverName, driverAliasName, driverNickName, driverPhone, driverRange, driverIntegral_count, carLoadNum, carPlateNum, carBrand, carType, starLevel, lat, lng, isReady, isWork, onLineTime);
    }

    public DriverSession SDclone() {
        return new DriverSession(driverNickName,driverName, driverPhone, lat, lng, isWork);
    }

}
